﻿using System.Collections.Generic;
using Longtop.Web.Helpers;
using Longtop.Web.WebSite.Admin.Shared;
using Longtop.Web.WebSite.Models;
using Longtop.Web.WebSite.Shared;
using Longtop.Web.WebSite.Models;
using Longtop.Web.SaleWeb.Models;

namespace Longtop.Web.WebSite.Admin {

    namespace Cases {
        public class IndexModel : Shared.IndexMasterModel { }

        public class CreateModel : Shared.CreateMasterModel {
            public Case Model { get; set; }
        }

        public class ListModel : Shared.ListMasterModel, IPagedModel<Case> {

            public ListModel() {
                this.PageSize = 10;
            }

            public PagedList<Case> PagedList {
                get;
                set;
            }

            public int PageSize {
                get;
                set;
            }
        }

    }
    namespace Roles {
        public class IndexModel : Shared.IndexMasterModel { }
        public class ListModel : Shared.ListMasterModel, IPagedModel<Role> {

            public ListModel() {
                this.PageSize = 20;
            }

            public PagedList<Role> PagedList {
                get;
                set;
            }

            public int PageSize {
                get;
                set;
            }
        }

        public class CreateModel : Shared.CreateMasterModel {

            public Role Model { get; set; }
        }

        public class PermissionsModel : Shared.ListMasterModel, IPagedModel<RolePermission> {

            public Role Role { get; set; }
            public PermissionsModel() {
                this.PageSize = 20;
            }

            public PagedList<RolePermission> PagedList {
                get;
                set;
            }

            public int PageSize {
                get;
                set;
            }
        }

        public class CreatePermissionModel : Shared.CreateMasterModel {
            public RolePermission Model { get; set; }
            public Role Role { get; set; }
            public List<RolePermission> Permissions { get; set; }

        }
    }
}
